package com.example.shiro.controller;

import com.example.shiro.service.SessionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description :
 * @Author : Bruce Lee
 * @CreateTime : 2024/5/28
 */

@RestController
@RequestMapping("/static")
public class TestController {

    @Autowired
    private SessionService sessionService;


    @RequestMapping("/test")
    public String test()
    {
        Integer sessionCount = sessionService.getSessionCount();
        return "当前session数为：" + sessionCount;
    }


    @RequestMapping("/403")
    public String test2()
    {
        return "认证失败";
    }
}
